
#ifndef __OUTLET_MANAGER_H__
#define __OUTLET_MANAGE_H__

#include "cocos2d.h"
#include "object/Outlet.h"
#include <vector>
#include "my_def.h"

using namespace cocos2d;

class COutlet_Manager : public CCLayer
{
public:

	COutlet_Manager();
	~COutlet_Manager();

	LAYER_NODE_FUNC(COutlet_Manager);
	
	void ShuffleOutlet();

	COutlet* GetOutlet(int nIdx);
	int GetOutletCount();

private:
	int GenerateValidType();
	void CreateOutlet();

private:
	bool init();

	std::vector<COutlet*> m_vOutlet;

	std::vector<COutlet*> m_vOutletTop;
	std::vector<COutlet*> m_vOutletBottom;
	std::vector<COutlet*> m_vOutletLeft;
	std::vector<COutlet*> m_vOutletRight;
	
	int m_nColorsCount[E_OUTLET_MAX];
};

#endif //__OUTLET_MANAGE_H__
